# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=jbrofuzz
pkgver=2.5
pkgrel=3
pkgdesc='Web application protocol fuzzer that emerged from the needs of penetration testing.'
url='http://sourceforge.net/projects/jbrofuzz/'
groups=('blackarch' 'blackarch-fuzzer')
license=('GPL')
depends=('java-environment')
arch=('any')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-jar-${pkgver//./}.zip")
sha512sums=('d5202e7445f8d311c165280deb5639a05e1605ed9c8932648b4fda9f7f98bb62412bacab8786f896479dfec0b7d44d862e60df46ef47aef8c8e44a09ed6a7917')

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -m 644 JBroFuzz.jar "$pkgdir/usr/share/$pkgname/JBroFuzz.jar"

  cp -a fuzzers examples "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec java -jar /usr/share/$pkgname/JBroFuzz.jar
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

